<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增商家信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-busiinfo-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">昵称：</label>
                <div class="col-sm-8">
                    <input name="nickname" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">密码：</label>
                <div class="col-sm-8">
                    <input name="password" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">营业执照图片路径：</label>
                <div class="col-sm-8">
                    <input name="file" class="form-control" type="file" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">负责人手机号：</label>
                <div class="col-sm-8">
                    <input name="phone" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">认证状态：</label>
                <div class="col-sm-8">
                    <select name="authState" class="form-control m-b" th:with="type=${@dict.getType('dl_auth_type')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />

    <!--引入axios框架-->
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>

    <script th:inline="javascript">
        var prefix = ctx + "mydy/busiinfo"
        $("#form-busiinfo-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                // $.operate.save(prefix + "/add", $('#form-busiinfo-add').serialize());
                $.operate.mysave(prefix + "/add" );
            }
        }
    </script>
</body>
</html>
